<template>
  <div class="async">
    <h2>异步组件</h2>
    <!-- <el-switch
      v-model="loading"
      :active-value="true"
      :inactive-value="false"
    ></el-switch> -->
    <Suspense>
      <template #default>
        <AsyncComponent></AsyncComponent>
      </template>
      <template #fallback>
        <AsyncSkl :loading="loading"></AsyncSkl>
      </template>
    </Suspense>
  </div>
</template>

<script setup lang="ts">
import AsyncComponent from "@components/AsyncComponent.vue";
import AsyncSkl from "@components/AsyncSkl.vue";
import { ref } from "vue";
const loading = ref(true);
</script>

<style lang="scss" scoped></style>
